package com.hainatong.jcmvvmbase.mainhome.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseDataBindingHolder;
import com.hainatong.jcmvvmbase.R;
import com.hainatong.jcmvvmbase.databinding.ItemLinyongWorkerViewBinding;
import com.hainatong.jcmvvmbase.mainhome.entity.WorkerEPMRecordBean;
import org.jetbrains.annotations.NotNull;

public class WorkerRecordAdapter extends BaseQuickAdapter<WorkerEPMRecordBean, BaseDataBindingHolder<ItemLinyongWorkerViewBinding>>
{

    public WorkerRecordAdapter()
    {
        super(R.layout.item_linyong_worker_view);
    }

    @Override
    protected void convert(@NotNull BaseDataBindingHolder<ItemLinyongWorkerViewBinding> bindingHolder, WorkerEPMRecordBean workerEPMRecordBean)
    {
        ItemLinyongWorkerViewBinding binding = bindingHolder.getDataBinding();


        if( binding != null )
        {
            binding.setRecordBean( workerEPMRecordBean );
            binding.executePendingBindings();
        }
    }
}
